#http://[2001:250:5062:1806:d8bf:2d80:825c:d7cd]:58090/archives/zheng-ze-biao-da-shi

import re

path="/zzzz/ddd/ddd/2012/10/xx/vv"
reg="/ddd/ddd/[0-9]{4}/[0-9]{1,2}/"

ret=re.findall(reg,path)
print(ret)

reg="^/zzzz/ddd/ddd/[0-9]{4}/[0-9]{1,2}/"
ret=re.findall(reg,path)
print(ret)

reg="^/ddd/ddd/[0-9]{4}/[0-9]{1,2}/$"
ret=re.findall(reg,path)
print(ret)